﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Markup;
using System.ComponentModel;

namespace MyPCTagging
{
    [ContentProperty("errorMessage")]

    public partial class ChildWindow1 : ChildWindow, INotifyPropertyChanged
    {
        public ChildWindow1(string error)
        {
            InitializeComponent();
            errorMessage = error;
        }

        public String errorMessage { get; set; }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }
        //事件委托
        public event PropertyChangedEventHandler PropertyChanged;//??

        private void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;

            if (null != handler)
                handler.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
